home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 68.7z / BS1 part 68 / Type Smith v2.0 (1993)(Relog)[h SR][WB].7z / Type Smith v2.0 (1993)(Relog)[h SR][WB].adf / REXX.lha / Rexx / LoadLibrary.tsrx < prev    next >
Text File  |  1993-11-08  |  2KB  |  69 lines

  1. /* LOAD LIBRARY: import IFF DR2D character drawings into an open font */
  2. /* Copyright 1993 Soft-Logik Publishing Corporation */
  3. /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4. /* $VER: 2.0 */
  5.  
  6. ADDRESS 'TYPESMITH'
  7. OPTIONS RESULTS
  8. TRACE OFF
  9.  
  10. /* Screen to front */
  11.  
  12. to_front
  13.  
  14. /* get the file name prefix for the drawings */
  15.  
  16. get_string 'Enter the filepath and filename prefix:|Ok|Exit'
  17. IF RC=5 THEN EXIT
  18.  
  19. library=RESULT
  20.  
  21. /* FIND WHICH CHARACTERS TO IMPORT */
  22.  
  23. firstchar=1
  24. lastchar=255
  25.  
  26. display_alert 'Import all 255 characters?|All|Some'
  27.  
  28. IF RC=5 THEN DO
  29.  
  30.     /* get the start and end characters to import */
  31.  
  32.     Get_First:
  33.     get_string 'Enter the number of the first character:|Ok|Exit'
  34.     IF RC=5 THEN EXIT
  35.     firstchar=RESULT
  36.     IF (firstchar<1)|(firstchar>255) THEN DO
  37.         display_alert 'Must be between 0 and 255.|Continue'
  38.         SIGNAL get_first
  39.     END
  40.  
  41.     Get_Last:
  42.     get_string 'Enter the number of the last character:|Ok|Exit'
  43.     IF RC=5 THEN EXIT
  44.     lastchar=RESULT
  45.     IF (lastchar<firstchar)|(lastchar>255) THEN DO
  46.         display_alert 'Must be between the first character and 255.|Continue'
  47.         SIGNAL get_last
  48. END
  49.  
  50. /* IMPORT LOOP */
  51.  
  52. importcount=0
  53.  
  54. DO i=firstchar TO lastchar
  55.     goto_char i
  56.     filename=library'.'i
  57.     import_dr2d filename
  58.     importcount=importcount+1
  59.     IF RC=20 THEN DO
  60.         display_alert 'File 'filename' does not exist!|Continue|Exit'
  61.         IF RC=5 THEN EXIT
  62.         importcount=importcount-1
  63.     END
  64. END
  65.  
  66. display_alert ' 'importcount' character(s) imported!|Exit'
  67.  
  68. /* THAT'S ALL SHE WROTE */
  69.